<%--
  Created by IntelliJ IDEA.
  User: dd
  Date: 2023/4/26
  Time: 17:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户管理</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui-v2.7.6/layui/css/layui.css" >
  <script src="${pageContext.request.contextPath}/static/layui-v2.7.6/layui/layui.js"></script>
  <style>
    body{padding: 6px 16px;}
    .demo-carousel{height: 200px; line-height: 200px; text-align: center;}
  </style>
</head>
<body>
<table id="demo" class="demo-carousel" lay-filter="test" ></table>
<script>
  layui.use(['table'], function(){
    var table = layui.table;
    table.render({
      elem: '#demo'
      ,id: 'test'
      ,url: '${pageContext.request.contextPath}/TabUserServlet?method=query' //数据接口
      ,page: true //开启分页
      ,limit:5
      // ,toolbar:'default'
      // ,autoSort:false
      ,limits:[5,10,15,20,25,30,100,200]
      ,cols: [[ //表头
        // {type: 'checkbox', fixed: 'left',id: 'test'},
        {field: 'id', title: 'ID', sort: true, fixed: 'left'}
        ,{field: 'username', title: '用户名'}
      ]]
    });
  })
</script>
</body>
</html>
